<?php

/*
Setup "Quests" (admin_setup_quests.php)
*/

$page_title = "Setting up Quests";
$rank_check = 7;
include "../header.inc.php";

print "$openHTML";

$findQuest = fetch("SELECT * FROM quest_items WHERE game = '$game'");

$explode_e_pts = explode(",", $findQuest[easy_pts]);
$explode_m_pts = explode(",", $findQuest[med_pts]);
$explode_h_pts = explode(",", $findQuest[hard_pts]);

ECHO <<<END

<p align=center><font size=+2><a href=setup_quests.php?game=$game>Read this before setting up the game!</a></font></p>

<P><FORM ACTION="admin_setup_quests.pro.php?game=$game" METHOD=POST>
   <CENTER><TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=420>
      <TR BGCOLOR="$topAndBottomBG">
         <TD COLSPAN=2 HEIGHT=40>
            <CENTER><FONT SIZE="+2" COLOR="$topAndBottomText"><B>Setup "Quests"</B></FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=120>
            <CENTER>Easy Requests:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=easy_i ROWS=7 COLS=35 WRAP=virtual>$findQuest[easy_i]</TEXTAREA></CENTER><br>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=120>
            <CENTER>Easy Prizes:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=easy_p ROWS=7 COLS=35 WRAP=virtual>$findQuest[easy_p]</TEXTAREA></CENTER>
			<br><center>Min. Points: <input type=text name=easy_pts_min size=8 value=$explode_e_pts[0]> Max. Points: <input type=text name=easy_pts_max size=8 value=$explode_e_pts[1]><br>Definite Prize: <input type=text name=def_e value="$findQuest[def_e]"> (optional)</center><br>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=120>
            <CENTER>Medium Requests:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=med_i ROWS=7 COLS=35 WRAP=virtual>$findQuest[med_i]</TEXTAREA></CENTER><br>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=120>
            <CENTER>Medium Prizes:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=med_p ROWS=7 COLS=35 WRAP=virtual>$findQuest[med_p]</TEXTAREA></CENTER>
			<br><center>Min. Points: <input type=text name=med_pts_min size=8 value=$explode_m_pts[0]> Max. Points: <input type=text name=med_pts_max size=8 value=$explode_m_pts[1]><br>Definite Prize: <input type=text name=def_i value="$findQuest[def_i]"> (optional)</center><br>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=120>
            <CENTER>Hard Requests:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=hard_i ROWS=7 COLS=35 WRAP=virtual>$findQuest[hard_i]</TEXTAREA></CENTER><br>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=120>
            <CENTER>Hard Prizes:</CENTER>
         </TD>
         <TD>
            <br><CENTER><TEXTAREA NAME=hard_p ROWS=7 COLS=35 WRAP=virtual>$findQuest[hard_p]</TEXTAREA></CENTER>
			<br><center>Min. Points: <input type=text name=hard_pts_min size=8 value=$explode_h_pts[0]> Max. Points: <input type=text name=hard_pts_max size=8 value=$explode_h_pts[1]><br>Definite Prize: <input type=text name=def_h value="$findQuest[def_h]"> (optional)</center><br>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD COLSPAN=2 HEIGHT=20 BGCOLOR="#FFFFFF">
            <CENTER><INPUT TYPE=submit NAME=Submit VALUE="Setup the Game!"></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>

END;

print "$closeHTML";
?>
